package com.domain;  
 2  
 3 import java.io.Serializable;  
 4  
 5 /**  
 6 *  
 7 * @TableName tb_book  
 8 */  
 9 public class Book implements Serializable {  
 10 /**  
 11 *  
 12 */  
 13 private Integer id;  
 14  
 15 /**  
 16 *  
 17 */  
 18 private String name;  
 19  
 20 /**  
 21 *  
 22 */  
 23 private String press;  
 24  
 25 /**  
 26 *  
 27 */  
 28 private String author;  
 29  
 30 private static final long serialVersionUID = 1L;  
 31  
 32 /**  
 33 *  
 34 */  
 35 public Integer getId() {  
 36 return id;  
 37 }  
 38  
 39 /**  
 40 *  
 41 */  
 42 public void setId(Integer id) {  
 43 this.id = id;  
 44 }  
 45  
 46 /**  
 47 *  
 48 */  
 49 public String getName() {  
 50 return name;  
 51 }  
 52  
 53 /**  
 54 *  
 55 */  
 56 public void setName(String name) {  
 57 this.name = name;  
 58 }  
 59  
 60 /**  
 61 *  
 62 */  
 63 public String getPress() {  
 64 return press;  
 65 }  
 66  
 67 /**  
 68 *  
 69 */  
 70 public void setPress(String press) {  
 71 this.press = press;  
 72 }  
 73  
 74 /**  
 75 *  
 76 */  
 77 public String getAuthor() {  
 78 return author;  
 79 }  
 80  
 81 /**  
 82 *  
 83 */  
 84 public void setAuthor(String author) {  
 85 this.author = author;  
 86 }  
 87  
 88 @Override  
 89 public boolean equals(Object that) {  
 90 if (this == that) {  
 91 return true;  
 92 }  
 93 if (that == null) {  
 94 return false;  
 95 }  
 96 if (getClass() != that.getClass()) {  
 97 return false;  
 98 }  
 99 Book other = (Book) that;  
 100 return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))  
 101 && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))  
 102 && (this.getPress() == null ? other.getPress() == null : this.getPress().equals(other.getPress()))  
 103 && (this.getAuthor() == null ? other.getAuthor() == null : this.getAuthor().equals(other.getAuthor()));  
 104 }  
 105  
 106 @Override  
 107 public int hashCode() {  
 108 final int prime = 31;  
 